MutableHeaders

interface MutableHeaders : Headers

Mutable non case sensitive HTTP headers.

Functions

add
Link copied to clipboard
open fun add(name: String, value: String)
Add a header, adding it to the existing header after a , if a this header has already been set.
addFrom
Link copied to clipboard
open infix fun addFrom(other: Iterable<Pair<String, String>>)
Add multiple headers.
open infix fun addFrom(other: Map<String, String>)
Add multiple headers.
contains
Link copied to clipboard
open operator fun contains(name: String): Boolean
Whether the value of name is set.
get
Link copied to clipboard
abstract operator fun get(name: String): String?
Get the value of a header.
plusAssign
Link copied to clipboard
open operator fun plusAssign(other: HeaderProvider)
Add headers from a provider.
open operator fun plusAssign(header: Pair<String, String>)
Add a header.
open operator fun plusAssign(other: Iterable<Pair<String, String>>)
Add multiple headers.
open operator fun plusAssign(other: Map<String, String>)
Add multiple headers.
set
Link copied to clipboard
abstract operator fun set(name: String, value: String)
Set a header.
setFrom
Link copied to clipboard
open infix fun setFrom(other: Iterable<Pair<String, String>>)
Set multiple headers.
open infix fun setFrom(other: Map<String, String>)
Set multiple headers.
toMap
Link copied to clipboard
abstract fun toMap(): Map<String, String>
unaryPlus
Link copied to clipboard
open operator fun HeaderProvider.unaryPlus()
Add headers from a provider.
open operator fun Iterable<Pair<String, String>>.unaryPlus()
Add multiple headers.
open operator fun Map<String, String>.unaryPlus()
Add multiple headers.

Sources

js source
Link copied to clipboard